
/*
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

class Student implements Comparable<Student>{
    String id;
    String name;
    int score;

    public Student(String id,String name, int score) {
        this.id = id;
        this.name = name;
        this.score = score;
    }

    public String getName() {
        return name;
    }

    public int compareTo(Student o){
        if(this.score!=o.score) {
            return -(score - o.score);
        }
        return this.id.compareTo(o.id);
    }

    public String toString() {
        return String.format("[%s,%s,%d]",id,name,score);
    }
}


public class Main{
    public static void main(String[] args) {
        List<Student> stuList = new ArrayList<Student>();
        Scanner sc = new Scanner(System.in);
        for(int i=0;i<5;i++) {
            String id = sc.next();
            String name = sc.next();
            int score = sc.nextInt();
            stuList.add(new Student(id,name,score));
        }
        Collections.sort(stuList);
        System.out.println(stuList);
        sc.close();
    }
}

 */